﻿$(document).ready(function () {
    $('#slides').slidesjs({
        width: 668,
        height: 224,
        pagination: {active: false},
        play: { auto: true,swap:true }
    });

    //validate
    $("#aspnetForm").validateWebForm();
})



function rcbHierarchyClientClicking(sender, args) {
    //var comboBoxName = sender._clientStateFieldID.split('_')[0];
    var comboBoxName = sender.get_id().replace("_i0_tvHierarchy", "");
    var comboBox = $find(comboBoxName);

    var node = args.get_node()
    comboBox.set_text(node.get_text());

    comboBox.trackChanges();
    comboBox.get_items().getItem(0).set_text(node.get_text());
    comboBox.commitChanges();

    comboBox.hideDropDown();

    // Call comboBox.attachDropDown if:
    // 1) The RadComboBox is inside an AJAX panel.
    // 2) The RadTreeView has a server-side event handler for the NodeClick event, i.e. it initiates a postback when clicking on a Node.
    // Otherwise the AJAX postback becomes a normal postback regardless of the outer AJAX panel.

    comboBox.attachDropDown();
}